package cn.com.surker.material.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 资产登记表
 * </p>
 *
 * @author admin
 * @since 2023-11-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class MaterialProperty implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 资产编号
     */
    private String code;

    /**
     * 资产名称
     */
    private String name;

    /**
     * 资产规格
     */
    private String norms;

    /**
     * 品牌
     */
    private String brand;

    /**
     * 登记数量
     */
    private Double num;

    /**
     * 单位
     */
    private String unit;

    /**
     * 公司ID
     */
    private Long orgId;

    /**
     * 公司
     */
    private String orgName;

    /**
     * 部门ID
     */
    private Long deptId;

    /**
     * 部门
     */
    private String deptName;

    /**
     * 责任人ID
     */
    private Long uid;

    /**
     * 责任人
     */
    private String realName;

    /**
     * 登记人
     */
    private Long creator;

    /**
     * 状态(0：启用，1：禁用)
     */
    private Integer status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 修改时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public MaterialProperty(){}
    public MaterialProperty(String code, String name, String norms, String brand, Double num, String unit, Long orgId, String orgName, Long deptId, String deptName, Long uid, String realName, Long creator, Integer status, String remark, Date createTime) {
        this.code = code;
        this.name = name;
        this.norms = norms;
        this.brand = brand;
        this.num = num;
        this.unit = unit;
        this.orgId = orgId;
        this.orgName = orgName;
        this.deptId = deptId;
        this.deptName = deptName;
        this.uid = uid;
        this.realName = realName;
        this.creator = creator;
        this.status = status;
        this.remark = remark;
        this.createTime = createTime;
    }
}
